package com.xyhua.mybatisplus.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sun.tools.corba.se.idl.constExpr.Or;
import com.xyhua.mybatisplus.entity.Order;
import com.xyhua.mybatisplus.entity.OrderUser;

import org.apache.ibatis.annotations.Param;

import java.awt.List;

/**
 * description: OrderMapper <br>
 * date: 2020/3/24 3:16 下午 <br>
 * author: huaxiansheng <br>
 * version: 1.0 <br>
 */
public interface OrderMapper extends BaseMapper<Order> {

    /**
     * 一对一 对象嵌套
     *
     * @param number
     * @return
     */
    OrderUser queryOrderUserByOrderNumber(@Param("number") String number);

    /**
     * 一对一 resultmap
     *
     * @param number
     * @return
     */
    Order queryOrderUserByOrderNumber2(@Param("number") String number);


    /**
     * 一对多
     *
     * @param number
     * @return
     */
    Order queryOrderWithUserAndDetailByOrderNumber(@Param("number") String number);

    /**
     * 多对多
     */
    Order queryOrderWithUserAndDetailItemByOrderNumber(@Param("number") String number);

}
